package com.guigu.yh.springcloud;

import com.guigu.yh.myrules.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;

/**
 * 订单服务启动类
 * @author zyh
 * @version 1.0.0
 * @date 2022/08/16
 */
@SpringBootApplication
//当前服务是client, 需要注册到EurekaServer
@EnableEurekaClient
//特殊化定制负载均衡规则，指定调用服务XXX-SERVICE时(name配置需要大写)，使用XxxRule.class作为负载规则
@RibbonClient(name = "CLOUD-PAYMENT-SERVICE",configuration = MySelfRule.class)
public class OrderMain80_eureka {

    public static void main(String[] args) {
        SpringApplication.run(OrderMain80_eureka.class,args);
    }
}
